package common.sort;

import java.util.Arrays;
import java.util.List;

import static utils.Tools.listOf;

public class SortApp {
    public static void main(String[] args) {

        int[][] matrix = new int[][]{
                {61, 17, 29, 22, 34, 60, 72, 21, 50, 1, 62, 100, 3, 6, 10, 5, 5}
        };

        final List<Sort> sorts = Arrays.asList(
                new SelectSort(),
                new InsertSort01(),
                new InsertSort02(),
                new BubbleSort(),
                new ShellSort(),
                new MergeSort(),
                new QuickSort01(),
                new QuickSort02(),
                new QuickSort03(),
                new CountingSort(),
                new BucketSort(),
                new HeapSort(),
                new RadixSort01(),
                new RadixSort02()
        );

        for (Sort sort : sorts) {
            int[] t = Arrays.copyOf(matrix[0], matrix[0].length);
            sort.sort(t);
            System.out.println(listOf(t));
        }
    }
}
